package com.pactera.madp.daemon.quartz.task;

import com.pactera.madp.common.core.constant.SecurityConstants;
import com.pactera.madp.common.core.util.R;
import com.pactera.madp.cp.api.feign.RemoteMediumService;
import com.pactera.madp.daemon.quartz.constant.enums.MadpQuartzEnum;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * MediumBeanTask
 *
 * @author jun
 * @version 1.0
 * 2021/7/4 12:02
 **/
@Slf4j
@Component(value = "mediumBeanTask")
@AllArgsConstructor
public class MediumBeanTask {

    private RemoteMediumService remoteMediumService;

    /**
     * 话术库mediaId批量更新
     * @return
     */
    @SneakyThrows
    public String saveMediaId(){
        log.info("定时任务执行");
        remoteMediumService.saveMediaId(SecurityConstants.FROM_IN);
        return MadpQuartzEnum.JOB_LOG_STATUS_SUCCESS.getType();
    }
}
